package org.jeecg;

import java.io.*;
import java.net.*;

public class UDP_Client {

    public static void main(String[] args) throws FileNotFoundException, SocketException, UnknownHostException {
        InetSocketAddress inetSocketAddress = new InetSocketAddress("192.168.2.70", 9999);
        byte[] udpMessage = "123123".getBytes();
        DatagramPacket datagramPacket = null;
        try (DatagramSocket datagramSocket = new DatagramSocket()) {
            datagramPacket = new DatagramPacket(udpMessage, udpMessage.length, inetSocketAddress);
            datagramSocket.send(datagramPacket);
        } catch (IOException e) {
        }
    }

}